Computer and Modernization ›› 2010, Vol. 1 ›› Issue (8): 120-123.doi: 10.3969/j.issn.1006-2475.2010.08.034
• 应用与开发 • Previous Articles Next Articles
HE Hong-hui1, LIU Ji-yu2
Received:
Revised:
Online:
Published:
Abstract: After compiling a source file by C++ compiler, the class definition information isn’t remained in object file. Therefore, the program at runtime can’t acquire the class information, such as class name,class hierarchy and so on, and consequently many operations such as dynamic_cast, persistence are impossible to be completed. RTTI is the key to conquer this problem. Although a great deal of importance is attached to RTTI, many C++ programmers are still confused by RTTI realization. In this paper, a concrete RTTI is realized, and it gives C++ programmers a chance to have a glimpse of RTTI realization.
Key words: RTTI, dynamic_cast, persistence
HE Hong-hui;LIU Ji-yu. Analysis of RTTI Realization[J]. Computer and Modernization, 2010, 1(8): 120-123.
0 / / Recommend
Add to citation manager EndNote|Ris|BibTeX
URL: http://www.c-a-m.org.cn/EN/10.3969/j.issn.1006-2475.2010.08.034
http://www.c-a-m.org.cn/EN/Y2010/V1/I8/120